<%@page import="helpers.UrlHelper"%>
<%@page import="entities.SiteConfig"%>
<%
SiteConfig siteConfig = (SiteConfig) request.getAttribute("config");
String title = (String) request.getParameter("title");
String description = (String) request.getParameter("description");
String keywords = (String) request.getParameter("keywords");
String ogSiteName = (String) request.getParameter("ogsite_name");
String ogTitle = (String) request.getParameter("ogtitle"); 
String ogUrl = (String) request.getParameter("ogurl");
String ogImage = (String) request.getParameter("ogimage");
String ogDescription = (String) request.getParameter("ogdescription");

if (title == null && siteConfig != null)
	title = siteConfig.getTitle();

if (description == null && siteConfig != null)
	description = siteConfig.getMetaDescription();

if (keywords == null && siteConfig != null)
	keywords = siteConfig.getMetaKeywords();

if (ogSiteName == null && siteConfig != null)
	ogSiteName = siteConfig.getSiteName();

if (ogTitle == null && siteConfig != null)
	ogTitle = siteConfig.getTitle();

if (ogDescription == null && siteConfig != null)
	ogDescription = siteConfig.getMetaDescription();

if (ogUrl == null)
	ogUrl = UrlHelper.getServerUrl(request);

if (ogImage == null)
	ogImage = UrlHelper.getServerUrl(request) + "/images/sitepage.png";

%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" itemscope itemtype="http://schema.org/Product">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<%=siteConfig.getHttpCharacterSet().toUpperCase()%>" />

<meta name="description" content="<%=description.replaceAll("[\"\']+", "")%>" >
<meta name="Keywords" content="<%=keywords.replaceAll("[\"\']+", "")%>" >
<meta itemprop="name" content="<%=ogTitle.replaceAll("[\"\']+", "")%>" />    
<meta itemprop="description" content="<%=ogDescription %>" />
<meta property="og:site_name" content="<%=ogSiteName %>" >
<meta property="og:title" content="<%=ogTitle.replaceAll("[\"\']+", "")%>" >
<meta property="og:url" content="<%=ogUrl%>" >
<meta property="og:image" content="<%=ogImage%>" >
<meta property="og:description" content="<%=ogDescription %>" >
<title><%=title%></title>

<link rel="alternate" type="application/rss+xml" title="Rss &raquo; Feed" href="<%=UrlHelper.getServerUrl(request) %>/rss" />
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<link rel="stylesheet" type="text/css" href="/css/custom.css" />
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/all.js"></script>
<!--[if lte IE 8]>
    <script src="/js/html5.js" type="text/javascript"></script>
	<body class="ie">
<![endif]-->
</head>

<body>
	<div id="master">
		<jsp:include page="/elements/login.jsp" />
		<nav id="mainMenu">
        	<div id="mainMenu_inner">
                <ul class="clearafter">
                    <li class="first home active"><a href="/">HOME</a></li>
                    <li class="network-tool"><a href="/network-tool">NETWORK TOOL</a></li>
                    <li class="check-speed"><a href="/check-speed">CHECK SPEED</a></li>
                    <li class="check-pr"><a href="/check-pr">CHECK PR</a></li>
                    <li class="myip"><a href="/myip">MY IP</a></li>
                    <li class="contact last"><a href="/contact-us">CONTACT US</a></li>
                </ul>
                <div class="clearbreak"></div>
            </div>
        </nav>
        <section id="content">
        	<div id="content_inner" class="clearafter">